MATLAB Differential and Integral Calculus by César Pérez López

MATLAB Differential and Integral Calculus by César Pérez López

Author:César Pérez López
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


extrema(expression,{equ1,...,equn},{variable1,...,variablen},n) The variable n returns the set of values obtained by evaluating the expression (objective function) at every candidate extreme point. These values will be used to differentiate between minima and maxima.

EXERCISE 4-20

Find and classify the extreme points of the function:

f(x, y, z) = x + z subject to the constraint x 2 + y 2 + z 2 = 1.

>> maple ('readlib (extrema)');

>> maple ('extrema(x+z,{x^2+y^2+z^2=1},{x,y,z},s)')

ans =

{2 ^(1/2), - 2 ^(1/2)}

The command extrema returns the values that the objective function takes at each extreme point and the variable s contains the extreme points.

>> maple ('s ')

ans =

{{z = 1/2 * 2 ^(1/2), x = 1/2 * 2 ^(1/2), y = 0}, {x = - 1/2 * 2 ^(1/2)}}

{{z = - 1/2 * 2 ^(1/2), y = 0}}

Thus the extreme points are:

(Ö2/2, 0, Ö2/2) and (−Ö2/2, 0, −Ö2/2)

Now let’s determine the nature of these extreme points. To do this, we evaluate the objective function at these points (we already know that the results are Ö2 and −Ö2).

>> maple ('obj:=(x,y,z) - > x+z');

>> maple('obj(sqrt(2)/2,0,sqrt(2)/2)')

ans =

2^(1/2)

>> maple('obj(-sqrt(2)/2,0,-sqrt(2)/2)')

ans =

-2 ^(1/2)

Then, at the point (−Ö2 /2, 0,−Ö2 /2) the function has a minimum, and there is a maximum at the point (Ö2/2,0,Ö2/2).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.